﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using Home.ZWave;

namespace Home.Server
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                HomeManager.Instance.SetSettingValue(HomeManager.baseAddressSettingKey, args[0]);
            }

            HomeManager.Instance.Start();

            try
            {
                Console.ReadLine();

                HomeManager.Instance.Stop();
            }
            catch(Exception ce)
            {
                Console.WriteLine("An exception occurred: {0}", ce.Message);
            }
        }
    }
}
